import HomeView from '../views/Home.vue'
import { useStore } from '@/stores/counter'
// const store = useStore()
// let staticroute = [
//     { path: '/', redirect: '/index' },
//     {
//         path: '/login',
//         name: 'login',
//         component: () => import('../views/login.vue')
//     },
// ]
let dynamicroute = [
    {
        path: '/home/department',
        name: 'department',
        component: () => import('../views/organize.vue'),
        meta: {
            title: '组织',
        }
    },
    {
        path: '/home/rule',
        name: 'rule',
        component: () => import('../views/role.vue'),
        meta: {
            title: '角色'
        }
    },
    {
        path: '/home/employee',
        name: 'employee',
        component: () => import('../views/Staff.vue'),
        meta: {
            title: '员工'
        },
        children: [
            {
                path: '/home/employee/add',
                name: 'employee/add',
                component: () => import('../views/staff/staffadd.vue'),
                meta: {
                    title: '添加员工',
                    names: 'home'
                }
            },
            {
                path: '/home/employee/detail',
                name: 'employee/detail',
                component: () => import('../views/staff/staffdetail.vue'),
                meta: {
                    title: '员工详情',
                    names: 'home'
                }
            }
        ]
    },
    {
        path: '/home/permission',
        name: 'permission',
        component: () => import('../views/jurisdiction.vue'),
        meta: {
            title: '权限'
        }
    },
    {
        path: '/home/attendance',
        name: 'attendance',
        component: () => import('../views/Attendance.vue'),
        meta: {
            title: '考勤'
        }
    },
    {
        path: '/home/approval',
        name: 'approval',
        component: () => import('../views/Approval.vue'),
        meta: {
            title: '审批'
        },
        children: [
            {
                path: '/home/approval/Approvaldetail',
                name: 'home',
                component: () => import('../views/Approvaldetail.vue'),
                meta: {
                    title: '审批详情'
                }
            },
        ]
    },
    {
        path: '/home/salary',
        name: 'salary',
        component: () => import('../views/Wages.vue'),
        meta: {
            title: '工资'
        },
        children: [
            {
                path: '/home/Wages/detail',
                name: 'Wages/detail',
                component: () => import('../views/wages/Wagesdetails.vue'),
                meta: {
                    title: '工资详情',
                    names: 'home'
                }
            },
            {
                path: '/home/Wages/setting',
                name: 'Wages/setting',
                component: () => import('../views/wages/setting.vue'),
                meta: {
                    title: '工资设置',
                    names: 'home'
                }
            }
        ]
    },
    {
        path: '/home/social',
        name: 'social',
        component: () => import('../views/Social.vue'),
        meta: {
            title: '社保'
        },
        children: [
            {
                path: '/home/Social/Report',
                name: 'Report',
                component: () => import('../views/Social/Report.vue'),
                meta: {
                    title: '社保月份报表',
                    names: 'home'
                }
            },
            {
                path: '/home/Social/archive',
                name: 'archive',
                component: () => import('../views/Social/archive.vue'),
                meta: {
                    title: '社保历史归档',
                    names: 'home'
                }
            }
        ]
    }

]
// let arr2: any = JSON.parse(localStorage.getItem('userData'))
// let newarr: any = []
// arr2.roles.menus.filter(item => {
//     console.log(item);
// })
// console.log(newarr);

// export default newarr